<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@page import="java.util.HashMap"%>
<%@page import="comm.util.RequestManager"%>
<%@page import="quik.member.MemberProc"%>
<%@page import="comm.util.CommUtil"%>
<%
	QuikHashMap hm = RequestManager.getRequest(request);
%>



<%@page import="comm.util.QuikHashMap"%><style>
li{
display: inline;
}
</style>


<title>Quik :: <%=CommUtil.NVL((String)session.getAttribute("SESSION_MEMBER_GROUPNAME"))%> - 비밀번호 변경</title>

<%@include file="./headerMenu.jsp" %>

<div id="smallmenu">
	<ul>
		<li><a href="./?content=myinfo&menu=changepw">비밀번호 변경</a></li>
		<li><a href="./?content=myinfo&menu=changenick">닉네임 변경</a></li>
		<li><a href="./?content=myinfo&menu=imgupload">이미지 등록</a></li>
	</ul>
</div>

<%if(hm.get("MENU")==null || hm.get("MENU").toString().equals("changepw")){
	if(hm.get("CHANGERESULT")!=null && hm.get("CHANGERESULT").toString().equals("1")){%>
		<p>비밀번호 변경 성공</p>
	<%}else if(hm.get("CHANGERESULT")!=null && hm.get("CHANGERESULT").toString().equals("0")){ %>
		<p style="color:red;">입력한 두 비밀번호는 일치해야 합니다. </p>
	<%}%>

<div id="content-top"></div>
		<div id="lista" class="box">
	<div>
		<form method="post" action="./jsp/myinfo/change_pw_proc.jsp">
			<p>비밀번호<input type="password" name="member_password" /></p>
			<p>비밀번호 확인<input type="password" name="member_passwordC" /></p>
			<div><input type="submit" value="비밀번호 변경"/></div>
		</form>
	</div>
</div>
<div id="content-bottom"></div>


<%}else if(hm.get("MENU").toString().equals("changenick")){ 
if(hm.get("CHANGERESULT")!=null && hm.get("CHANGERESULT").toString().equals("1")){%>
		<p>닉네임 변경 성공</p>
	<%}else if(hm.get("CHANGERESULT")!=null && hm.get("CHANGERESULT").toString().equals("0")){ %>
		<p style="color:red;">닉네임이 중복되었거나, 입력한 값이 올바르지 않습니다.</p>
	<%}%>
<title>Quik - 닉네임 변경</title>
<div id="content-top"></div>
		<div id="lista" class="box">
<div>
	<div>현재 닉네임 : <%=session.getAttribute("SESSION_MEMBER_NICKNAME") %></div>
	<form method="post" action="./jsp/myinfo/change_nick_proc.jsp">
		<div>닉네임<input type="type" name="member_nick" /></div>
		<div><input type="submit" value="닉네임 변경"/></div>
	</form>
</div>
</div>
<div id="content-bottom"></div>

<%}else if(hm.get("MENU").toString().equals("imgupload")){
	if(hm.get("CHANGERESULT")!=null && hm.get("CHANGERESULT").toString().equals("1")){%>
		<p>이미지 업로드 성공</p>
	<%}else if(hm.get("CHANGERESULT")!=null && hm.get("CHANGERESULT").toString().equals("0")){ %>
		<p style="color:red;">업로드에 실패하였습니다. 다시시도해주세요.</p>
	<%}%>
<title>Quik - 이미지 업로드</title>

<div id="content-top"></div>
		<div id="lista" class="box">
<div>
	<form method="post" action="./jsp/myinfo/img_upload_proc.jsp" enctype="multipart/form-data" >
	<%
		MemberProc mem = new MemberProc();
	%>
		<p>현재이미지</p>
		<p><img src="<%=mem.getCurImg(request) %>" alt="현재 이미지" width="100px"/></p>
		<p>이미지<input type="file" name="member_img" /></p>
		<div><input type="submit" value="이미지 업로드"/></div>
	</form>
</div>
</div>
<div id="content-bottom"></div>


<%}else{%>
<div>잘못된 페이지 요청입니다.</div>
<%}%>
